﻿

<h1>@String.Format("Dear {0},", ViewBag.Data.Appointment.RequestorName)</h1>

<h3 style="color:red;">@ViewBag.Data.CalendarOwnerName <strong>refused</strong> your appointment request.</h3>

<table>
    
    @if (ViewBag.Data.Appointment.RequestedStartDate != null)
    {
    <tr>
        <td>Date</td>
        <td>@ViewBag.Data.Appointment.RequestedStartDate.ToString("yyyy-MM-dd")</td>
    </tr>
    <tr>
        <td>Start time</td>
        <td>@ViewBag.Data.Appointment.RequestedStartDate.ToString("HH:mm")</td>
    </tr>
    }
    @if (ViewBag.Data.Appointment.RequestedEndDate != null){
    <tr>
        <td>End time</td>
        <td>@ViewBag.Data.Appointment.RequestedEndDate.ToString("HH:mm")</td>
    </tr>
    }
    <tr>
        <td>Title</td>
        <td>@ViewBag.Data.Appointment.Title</td>
    </tr>
    <tr>
        <td>Description</td>
        <td>@ViewBag.Data.Appointment.Description</td>
    </tr>
    <tr>
        <td>Requestor Name</td>
        <td>@ViewBag.Data.Appointment.RequestorName</td>
    </tr>
    <tr>
        <td>Requestor email</td>
        <td><a href="@String.Format("mailto:{0}",ViewBag.Data.Appointment.RequestorEmail)">@ViewBag.Data.Appointment.RequestorEmail</a></td>
    </tr>
    <tr>
        <td>Requestor phone number</td>
        <td>@ViewBag.Data.Appointment.RequestorPhoneNumber</td>
    </tr>
</table>

@*<p>
    <a href="@Url.Action("Accept", "Appointment", new { id = ViewBag.Data.Appointment.URLCode },"http")">@String.Format("Click here to accept the request: {0}", Url.Action("Accept", "Appointment", new { id = ViewBag.Data.Appointment.URLCode },"http"))</a>
</p>*@
<p>
    <a href="@Url.Action("Index", "Calendar", new { id = ViewBag.Data.Appointment.Calendar.ID}, "http")" >@String.Format("Click here to view the calendar {0}", Url.Action("Index", "Calendar", new { id = ViewBag.Data.Appointment.Calendar.ID}, "http"))</a>
</p>